home *** CD-ROM | disk | FTP | other *** search
/ Adobe Graphics & Publishing SDK 1996 December / Adobe Graphics & Publishing SDK 1996 December.iso / mac / PageMaker 6.5 SDK Mac / SourceCode / Includes / OldParameterBlock.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-18  |  5.2 KB  |  136 lines  |  [TEXT/CWIE]

  1. /**[f******************************************************************
  2.  * cqparblk.h -    
  3.  *
  4.  * Copyright: ⌐ 1990, 1991 Aldus, Corp., all rights reserved
  5.  *
  6.  * ABSTRACT:  
  7.  *    Contains declarations for Addition Paramter blocks.
  8.  *
  9.  *
  10.  ***f]******************************************************************/
  11.  
  12. #ifndef _CQPARBLK
  13. #define _CQPARBLK
  14.  
  15.  
  16.     /*  ----------- Include Files ------------------ */
  17. #if !defined(_ALDTYPES)
  18. #include "oldtypes.h"
  19. #endif
  20. /* This should be replaced.
  21. #if !defined(_ALDUTILS)
  22. #include "aldutils.h"
  23. #endif
  24.  
  25. #if !defined(_CQRSTYLE)
  26. #include "cqrstyle.h"
  27. #endif
  28.  
  29. #if !defined(_CQUNITS)
  30. #include "cqunits.h"
  31. #endif
  32.  
  33. #if !defined(_ALDADDN)
  34. #include "aldaddn.h"
  35. #endif      */
  36.  
  37.  
  38.     /*  ----------- Defines ------------------------ */
  39.     #define ALDUS_VERS            0x0200
  40.  
  41.     /*  ----------- ROM Globals -------------------- */
  42.     /*  ----------- Macro Definitions -------------- */
  43.     /*  ----------- Type Definitions --------------- */
  44.  
  45.     typedef WORD     ADNOPCODE;            // -- oc -- 
  46.     typedef DWORD    ADNPROPERTIES;        // -- apr -- 
  47.     typedef short    BOOL16;                //Boolean types in additions should always be 16bits
  48.                                         //regardless on what platform they run under.    
  49.  
  50.  
  51.     /*  ----------- Macro Definitions -------------- */
  52.  
  53.  
  54.  
  55.         //---------------------------------------------------------
  56.         //    The following are component macros.  They can be used
  57.         //    individually, but are primarily used by the compound
  58.         //    macros at the end of this section.
  59.         //
  60.         //    The following set individual fields in the parameter block:
  61.         //---------------------------------------------------------
  62.     #define PBGetOpCode(lpPB)                ((LPPARAMBLOCK)lpPB)->opCode
  63.     #define PBSetOpCode(lpPB, op)            ((LPPARAMBLOCK)lpPB)->opCode = op
  64.     #define PBGetID(lpPB)                    ((LPPARAMBLOCK)lpPB)->subCode
  65.     #define PBSetID(lpPB,dw)                ((LPPARAMBLOCK)lpPB)->subCode = ((DWORD)dw)
  66.     #define PBGetHPrivate(lpPB)                ((LPPARAMBLOCK)lpPB)->pluginData
  67.     #define PBSetHPrivate(lpPB,h)            ((LPPARAMBLOCK)lpPB)->pluginData = ((HANDLE)h)
  68.     #define PBGetErrMessage(lpPB)            ((LPPARAMBLOCK)lpPB)->errMessage
  69.     #define PBSetErrMessage(lpPB,hMsg)        ((LPPARAMBLOCK)lpPB)->errMessage = ((HANDLE)hMsg)
  70.     
  71.     #define PBGetRequestData(lpPB)            ((LPPARAMBLOCK)lpPB)->requestData
  72.     #define PBSetRequestData(lpPB, lpD)        ((LPPARAMBLOCK)lpPB)->requestData = ((LPVOID)(lpD))
  73.     #define PBGetRequestRefStyle(lpPB)        (WORD)(((LPPARAMBLOCK)lpPB)->requestStyle)
  74.     #define PBSetRequestRefStyle(lpPB,sy)    ((LPPARAMBLOCK)lpPB)->requestStyle = ((WORD)sy)
  75.     #define PBGetRequestDataSize(lpPB)        ((LPPARAMBLOCK)lpPB)->requestSize
  76.     #define PBSetRequestDataSize(lpPB,sz)    ((LPPARAMBLOCK)lpPB)->requestSize = (DWORD)(sz)
  77.     
  78.     #define PBGetReplyData(lpPB)            ((LPPARAMBLOCK)lpPB)->replyData
  79.     #define PBSetReplyData(lpPB, lpD)        ((LPPARAMBLOCK)lpPB)->replyData = ((LPVOID)(lpD))
  80.     #define PBGetReplyRefStyle(lpPB)        (WORD)(((LPPARAMBLOCK)lpPB)->replyStyle)
  81.     #define PBSetReplyRefStyle(lpPB,sy)        ((LPPARAMBLOCK)lpPB)->replyStyle = ((WORD)sy)
  82.     #define PBGetReplyDataSize(lpPB)        ((LPPARAMBLOCK)lpPB)->replySize
  83.     #define PBSetReplyDataSize(lpPB,sz)        ((LPPARAMBLOCK)lpPB)->replySize = (DWORD)(sz)
  84.     
  85.     
  86.     
  87.         //---------------------------------------------------------
  88.         //    The following set the units used for request and 
  89.         //    query reply results for text format commands and queries.
  90.         //    For Binary commands and queries, all measurements are
  91.         //    assumed to be in Twips.  
  92.         //
  93.         //    PageMaker's Twip is 1/20th of a PostScript Point.
  94.         //
  95.         //    Units must be set manually prior to sending any Text
  96.         //    commands or queries.  If you work with only one set of
  97.         //    units, this need only be done once per invocation.
  98.         //---------------------------------------------------------
  99.     #define PBGetRequestUnits(lpPB)            ((LPPARAMBLOCK)lpPB)->requestUnits
  100.     #define PBSetRequestUnits(lpPB, u)        ((LPPARAMBLOCK)lpPB)->requestUnits = (u)
  101.     #define PBGetReplyUnits(lpPB)            ((LPPARAMBLOCK)lpPB)->replyUnits
  102.     #define PBSetReplyUnits(lpPB, u)        ((LPPARAMBLOCK)lpPB)->replyUnits = (u)
  103.  
  104.         //---------------------------------------------------------
  105.         //    This macro calls PageMaker once a Parameter block has 
  106.         //    been properly filled out.  It is performed as part of 
  107.         //    the macros that issue Text and Binary commands and queries 
  108.         //    later in this section.  You will probably not need to use it
  109.         //    directly.
  110.         //---------------------------------------------------------
  111.     #define PBCallback(lpPB)                ((RC)(lpPB->pmCallback(lpPB)))
  112.  
  113.         //---------------------------------------------------------
  114.         //    The following macros set an entire ARGBLOCK in the
  115.         //    PARAMBLOCK.  Currently, fields are automatically cleared
  116.         //    in the Reply Block prior to issuing a Command.
  117.         //
  118.         //    You should not plan on keeping results in the Reply Block
  119.         //    across calls to PageMaker as this will be enforced in
  120.         //    the future.
  121.         //---------------------------------------------------------
  122.     #define PBSetRequestBlock(lpPB,rs,pv,sz)    (void)(PBSetRequestRefStyle(lpPB,rs),     \
  123.                                                     PBSetRequestData(lpPB,pv),            \
  124.                                                     PBSetRequestDataSize(lpPB,sz))
  125.     #define PBClearRequestBlock(lpPB)            PBSetRequestBlock(lpPB,NULL,NULL,NULL)
  126.     
  127.     #define PBSetReplyBlock(lpPB,rs,pv,sz)        (void)(PBSetReplyRefStyle(lpPB,rs),         \
  128.                                                     PBSetReplyData(lpPB,pv),            \
  129.                                                     PBSetReplyDataSize(lpPB,sz))
  130.     #define PBClearReplyBlock(lpPB)                PBSetReplyBlock(lpPB,NULL,NULL,NULL)
  131.  
  132.  
  133.         
  134. #endif //_CQPARAMBLK        
  135.         
  136.